﻿using DomainModel;
using Repository.Abstract;

namespace Repository.NHibernate
{
    public class SubjectRepository : Repository<Subject>, ISubjectRepository
    {
        public Subject GetByName(string name)
        {
            using (Session)
            {
                return Session.QueryOver<Subject>().Where(s => s.Name == name).SingleOrDefault();
            }
        }
    }
}